#pragma once

#include "Defines.h"
#include <string>
#include <Sfml/System.hpp>
#include <Sfml/Graphics.hpp>

enum TileType {
	TILE_EMPTY		= 1,
};

class Tile
{
public:
	Tile(): image(NULL) {}
	Tile(const std::string& filename);
	virtual ~Tile(void);

	inline const sf::Vector2f& GetPos() const { return pos;}
	inline const sf::Vector2f GetSize() const { return sf::Vector2f((float)image->GetWidth(),(float)image->GetHeight()); }
	inline void SetPos(const sf::Vector2f& p) { pos = p; }
	inline void SetPos(int x, int y) { pos = sf::Vector2f((float)x, (float)y); }

	virtual void Update(int diff);
	virtual void Draw(sf::RenderWindow* target);
	const sf::Image& GetImage() const {return *image;}	//CRASH ALERT!
	
	virtual void Load(const std::string& filename);
	
private:
	sf::Vector2f pos;
	sf::Image* image;
	uint16 filename;			//TODO: remove this!
};
